home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Performance Co-Pilot 1.3
/
SGI Performance Co-Pilot 1.3.iso
/
dist
/
pcp.idb
/
usr
/
share
/
catman
/
u_man
/
cat1
/
dbpmda.z
/
dbpmda
Wrap
Text File
|
1997-04-03
|
11KB
|
265 lines
DDDDBBBBPPPPMMMMDDDDAAAA((((1111)))) DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))
NNNNAAAAMMMMEEEE
ddddbbbbppppmmmmddddaaaa - debugger for Performance Co-Pilot PMDA
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ddddbbbbppppmmmmddddaaaa [----eeeeiiii] [----DDDD _d_e_b_u_g] [----nnnn _n_a_m_e_s_p_a_c_e]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
ddddbbbbppppmmmmddddaaaa is an interactive interface to the interactions between a PPPPMMMMDDDDAAAA(3)
and ppppmmmmccccdddd(1). This allows Performance Metric Domain Agents (PMDAs) to be
attached, initialized and exercised to test for correctness.
ddddbbbbppppmmmmddddaaaa interactively prompts the user for commands, many of which emulate
the Protocol Data Units (PDUs) that may be sent by a ppppmmmmccccdddd(1) process.
After running ddddbbbbppppmmmmddddaaaa, enter the command hhhheeeellllpppp to get a list of the
available commands. The example section below illustrates a session
using ddddbbbbppppmmmmddddaaaa to test a PMDA.
To simplify repetitive testing of a PMDA, the file ._d_b_p_m_d_a_r_c in the
current working directory can contain a list of commands that will be
executed by ddddbbbbppppmmmmddddaaaa on startup, before the user is prompted to enter
further commands interactively.
ddddbbbbppppmmmmddddaaaa accepts the following command line arguments:
----DDDD Set the PPPPMMMMAAAAPPPPIIII(3) debug control variable (ppppmmmmDDDDeeeebbbbuuuugggg) to start with the
value _d_e_b_u_g. This value should be a combination of the flags
described by ppppmmmmddddbbbbgggg(1). This value can be set within a ddddbbbbppppmmmmddddaaaa
session with the ddddeeeebbbbuuuugggg command.
----eeee Echo the input to ssssttttddddoooouuuutttt.
----iiii Emulate interactive behavior and prompt for new commands, even if
standard input is not a tty device.
----nnnn Specify the _n_a_m_e_s_p_a_c_e that ddddbbbbppppmmmmddddaaaa should use.
As there are no timeout constraints on a PMDA while using ddddbbbbppppmmmmddddaaaa (as
compared to ppppmmmmccccdddd(1)), another debugger like ddddbbbbxxxx(1) can be used on the
PMDA process once it has been attached.
EEEEXXXXAAAAMMMMPPPPLLLLEEEE
Below is a ddddbbbbppppmmmmddddaaaa session using the _s_i_m_p_l_e PMDA. A ....ddddbbbbppppmmmmddddaaaarrrrcccc file is used
to set the debugging flag, open the PMDA and display the current status
of the debugger:
$ cat .dbpmdarc
debug libpmda
open dso mips_o32.pmda_simple.so simple_init 253
status
PPPPaaaaggggeeee 1111
DDDDBBBBPPPPMMMMDDDDAAAA((((1111)))) DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))
When ddddbbbbppppmmmmddddaaaa is run, the commands in the ....ddddbbbbppppmmmmddddaaaarrrrcccc file are executed
first:
$ dbpmda
[Thu Apr 18 09:40:35] pcp(11268) Debug: help file /var/pcp/config/simple/help
opened
[Thu Apr 18 09:40:35] pcp(11268) Info: name = simple DSO
[Thu Apr 18 09:40:35] pcp(11268) Info: domain = 253
[Thu Apr 18 09:40:35] pcp(11268) Info: num metrics = 4
[Thu Apr 18 09:40:35] pcp(11268) Info: num indom = 1
[Thu Apr 18 09:40:35] pcp(11268) Info: direct map = 1
PMDA = mips_o32.pmda_simple.so
Connection = dso
pmDebug = 32768 ( libpmda )
Timer = off
Dump Instance Profile state=INCLUDE, 0 profiles
To examine the metric and instance descriptors, the ddddeeeesssscccc and iiiinnnnssssttttaaaannnncccceeee
commands can be used. Metrics may be identified either by name, or using
the ``dotted'' notation to specify the domain, cluster and item fields of
a PMID. Instance domains must be identified using a ``dotted'' notation
to specify the domain and serial fields. The syntax for most commands
will be displayed if the command is given without any arguments:
dbpmda> desc 253.0.0
PMID: 253.0.0
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: instant Units: none
dbpmda> instance
instance indom# [ number | name | "name" ]
dbpmda> instance 253.1
pmInDom: 253.1
[ 0] inst: 0 name: "red"
[ 1] inst: 1 name: "green"
[ 2] inst: 2 name: "blue"
To test the most important component of a PMDA, the ffffeeeettttcccchhhh, it is often
useful to determine the time it takes the PMDA to respond. The ttttiiiimmmmeeeerrrr may
be turned on before giving a ffffeeeettttcccchhhh:
dbpmda> timer on
dbpmda> fetch simple.numfetch 253.0.1
PMID(s): 253.0.0 253.0.1
pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 2
253.0.0 (simple.numfetch): numval: 1 valfmt: 0 vlist[]:
value 1
253.0.1 (simple.color): numval: 3 valfmt: 0 vlist[]:
inst [0 or ???] value 1
inst [1 or ???] value 101
PPPPaaaaggggeeee 2222
DDDDBBBBPPPPMMMMDDDDAAAA((((1111)))) DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))
inst [2 or ???] value 201
Timer: 0.003921 seconds
dbpmda> timer off
The simple PMDA also supports the ssssttttoooorrrreeee operation which can be tested
with subsequent ffffeeeettttcccchhhh commands:
dbpmda> store simple.numfetch "42"
PMID: 253.0.0
Getting description...
Getting Result Structure...
253.0.0: 2 -> 42
dbpmda> fetch simple.numfetch
PMID(s): 253.0.0
pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1
253.0.0 (simple.numfetch): numval: 1 valfmt: 0 vlist[]:
value 43
A pppprrrrooooffffiiiilllleeee can be specified for each instance domain which includes all,
some or no instances:
dbpmda> help profile
profile indom# [ all | none ]
profile indom# [ add | delete ] number
For the instance domain specified, the profile may be changed to
include 'all' instances, no instances, add an instance or delete
an instance.
dbpmda> profile 253.1 none
dbpmda> fetch 253.0.1
PMID(s): 253.0.1
pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1
253.0.1 (simple.color): No values returned!
dbpmda> profile 253.1 add 2
dbpmda> fetch 253.0.1
PMID(s): 253.0.1
pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1
253.0.1 (simple.color): numval: 1 valfmt: 0 vlist[]:
value 202
dbpmda> profile 253.1 add 0
dbpmda> fetch 253.0.1
PMID(s): 253.0.1
pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1
253.0.1 (simple.color): numval: 2 valfmt: 0 vlist[]:
inst [0 or ???] value 2
inst [2 or ???] value 203
dbpmda> status
PMDA = mips_o32.pmda_simple.so
Connection = dso
PPPPaaaaggggeeee 3333
DDDDBBBBPPPPMMMMDDDDAAAA((((1111)))) DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))
pmDebug = 32768 ( libpmda )
Timer = off
Dump Instance Profile state=INCLUDE, 1 profiles
Profile [0] indom=1061158913 [253.1] state=EXCLUDE 2 instances
Instances: [2] [0]
dbpmda> quit
CCCCAAAAVVVVEEEEAAAATTTTSSSS
A value cannot be stored into a metric of type PPPPMMMM____TTTTYYYYPPPPEEEE____AAAAGGGGGGGGRRRREEEEGGGGAAAATTTTEEEE.
The ffffeeeettttcccchhhh command will display all values as integers regardless of their
actual type. This is consistent with the behavior of ppppmmmmccccdddd(1) which does
obtain and use the metric description structure.
ddddbbbbppppmmmmddddaaaa uses ffffoooorrrrkkkk(2) and eeeexxxxeeeecccc(2) to attach to daemon PMDAs. ddddbbbbppppmmmmddddaaaa makes
no attempt to detect the end of the daemon PMDA process, so it is
possible for a PMDA to exit unexpectedly without any notification.
However, any communication with the PMDA will result in errors which will
indicate that the PMDA is no longer responding.
FFFFIIIILLLLEEEESSSS
./._d_b_p_m_d_a_r_c List of commands to do on startup.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
ppppmmmmddddbbbbgggg(1), ppppmmmmccccdddd(1), ffffoooorrrrkkkk(2), eeeexxxxeeeecccc(2), PPPPMMMMAAAAPPPPIIII(3) and PPPPMMMMDDDDAAAA(3).
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
Are intended to be self explanatory.
PPPPaaaaggggeeee 4444